package com.sstir.doctor.mapper;

import com.sstir.doctor.entity.UserInfoEntity;
import com.sstir.doctor.pojo.vo.UserScoreVO;
import org.mapstruct.Mapper;
import org.mapstruct.Mapping;
import org.mapstruct.Mappings;
import org.mapstruct.factory.Mappers;

/**
 * @ClassName UserInfoVOConvert
 * @Description
 * @Author hanjunjun
 * @Date 2021/1/15 10:23
 */
@Mapper
public interface UserInfoVOConvert {

    UserInfoVOConvert INSTANCE = Mappers.getMapper(UserInfoVOConvert.class);

    @Mappings({
            @Mapping(source = "username", target = "userName"),
            @Mapping(source = "score", target = "userScore"),
            @Mapping(source = "userDiff", target = "userDiff")
    })
    UserInfoEntity convertUserScoreVO2Entity(UserScoreVO userScoreVO);

}